import request from '@/router/axios';

export const getList = (current, size, params) => {
    return request({
        url: '/api/blade-user/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const remove = (ids) => {
    return request({
        url: '/api/blade-user/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

export const add = (row) => {
    return request({
        url: '/api/blade-user/submit',
        method: 'post',
        data: row
    })
}

export const update = (row) => {
    return request({
        url: '/api/blade-user/submit',
        method: 'post',
        data: row
    })
}

export const getNotice = (id) => {
    return request({
        url: '/api/blade-user/detail',
        method: 'get',
        params: {
            id
        }
    })
}

export const getWater = (params) => {
    return request({
        url: '/api/vcustom/getJournalAccount',
        method: 'get',
        params: params
    })
}
export const getmyList = (params) => {
    return request({
        url: '/api/vcustom/getAllTenant',
        method: 'get',
        params: params
    })
}

// 提现接口-个人
export const getUserWidthraw = (params) => {
    return request({
        url: '/api/vcustom/getUserDetail',
        method: 'get',
        params: params
    })
}
// 提现接口-公司
export const getCompanyWidthraw = (params) => {
    return request({
        url: '/api/vcustom/pageall',
        method: 'get',
        params: params
    })
}
// 提现接口 - 公司审批
export const approvalCompany = (params) => {
    return request({
        url: '/api/vcustom/examineIng',
        method: 'get',
        params: params
    })
}

// 公司列表
export const getTenant = (params) => {
    return request({
        url: '/api/vcustom/getAllTenant',
        method: 'get',
        params: params
    })
}

// 公司详情
export const getOneTenantData = (params) => {
    return request({
        url: '/api/vcustom/getOneTenant',
        method: 'get',
        params: params
    })
}

// 公司信息编辑
export const editTenant = (params) => {
    return request({
        url: '/api/vcustom/dataShow',
        method: 'post',
        data: params
    })
}

// 获取经理下拉框数据
export const getManagerList = (params) => {
    return request({
        url: '/api/vcustom/getManagerList',
        method: 'get',
        params: params
    })
}

// VIP 列表
export const getVipList = (params) => {
    return request({
        url: '/api/vcustom/page',
        method: 'get',
        params: params
    })
}

// VIP 新增
export const getVipAdd = (params) => {
    return request({
        url: '/api/vcustom/save',
        method: 'get',
        params: params
    })
}

// 用户福利列表
export const getWalfareList = (params) => {
    return request({
        url: '/api/vcustom/getUserWalfareList',
        method: 'get',
        params: params
    })
}

// 用户福利详情
export const getWalfareInfo = (params) => {
    return request({
        url: '/api/vcustom/getOneUserWalfareList',
        method: 'get',
        params: params
    })
}

// 用户购买列表
export const getSignList = (params) => {
    return request({
        url: '/api/vcustom/getUserSignList',
        method: 'get',
        params: params
    })
}

export const Vip = (params) => {
    return request({
        url: '/api/vcustom/save',
        method: 'post',
        data: params,
    })
}
export const getPeopleList = (params) => {
    return request({
        url: '/api/vcustom/getEmployeeList',
        method: 'get',
        params: params,
    })
}

export const getPeopleId = (params) => {
    return request({
        url: '/api/vcustom/resetEmployeePassword',
        method: 'post',
        params: params,
    })
}

export const uploadFilePhoto = (file, name) => {
    return request({
        url: '/api/updateFile/uploadFilePhoto',
        method: 'post',
        params: {
            file
        },
    })
}